package com.company;
import com.manager.Manager;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
	// write your code here
        Manager m = new Manager();
        Scanner sc = new Scanner(System.in);
        while (true) {
            int idx = sc.nextInt();
            System.out.println("*****************************");
            System.out.println("1.插入数据");
            System.out.println("2.显示所有数据");
            System.out.println("3.在指定位置处插入数据");
            System.out.println("4.查询能被3整除的数据");
            System.out.println("0.退出");
            System.out.println("*****************************");
            switch (idx) {
                case 0: {
                    return;
                }
                case 1: {
                    for (int i = 1; i < 10; i++) {
                        int temp = sc.nextInt();
                        m.insertData(m.data, temp,i - 1);
                    }
                    break;
                }
                case 2: {
                    m.showData(m.data);
                    break;
                }
                case 3: {
                    int temp = sc.nextInt();
                    int index = sc.nextInt();
                    m.insertData(m.data, temp, index);
                    break;
                }
                case 4: {
                    m.findData(m.data);
                    break;
                }
                default: {
                    System.out.println("请输入0-4之间整数作为选择哦");
                }
            }
        }
    }
}
